package com.minhua.jijiehao2.mainframe.mine.problemactivity.impl

import com.minhua.jijiehao2.base.BaseMvpPresenter
import com.minhua.jijiehao2.bean.BaseBean
import com.minhua.jijiehao2.bean.QuestionBean
import com.minhua.jijiehao2.http.CallBack
import com.minhua.jijiehao2.http.ParamsMap
import com.minhua.jijiehao2.mainframe.mine.problemactivity.imp.IProblemPresenter
import com.minhua.jijiehao2.mainframe.mine.problemactivity.imp.IProblemView

class ProblemPresenter : BaseMvpPresenter<IProblemView>(), IProblemPresenter {

    private val mProblemModel = ProblemModel()

    override fun getProblemList() {
        val map = ParamsMap()
        mProblemModel.getProblemList(map, object : CallBack<List<QuestionBean>>() {
            override fun onSuccess(t: BaseBean<List<QuestionBean>>) {
                v?.onProblemSuccess(t.data!!)
            }
        })
    }
}